package com.thb.pay.api.agent.fallback;

import com.thb.pay.api.agent.AgentAccountHistoryServiceApi;
import com.thb.pay.api.agent.vo.req.AgentAccountHistoryPageReq;
import com.thb.pay.api.agent.vo.req.AgentAccountHistoryReq;
import com.thb.pay.api.agent.vo.resp.AgentAccountHistoryVo;
import com.thb.pay.core.utils.PageResult;
import feign.hystrix.FallbackFactory;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;
import java.util.Map;

@Slf4j
@Component
public class AgentAccountHistoryServiceApiFallbackFactory implements FallbackFactory<AgentAccountHistoryServiceApi> {


    @Override
    public AgentAccountHistoryServiceApi create(Throwable throwable) {
        return new AgentAccountHistoryServiceApi() {

            @Override
            public PageResult<AgentAccountHistoryVo> findPage(@RequestBody AgentAccountHistoryPageReq pageReq) {
                return null;
            }

            @Override
            public int count(@RequestBody AgentAccountHistoryReq agentAccountHistoryReq) {
                return 0;
            }

            @Override
            public AgentAccountHistoryVo getById(@RequestParam("id") Long id) {
                return null;
            }

            @Override
            public AgentAccountHistoryVo getByAgentIdAndId(@RequestParam("agentId") Long agentId, @RequestParam("id") Long id) {
                return null;
            }

            @Override
            public List<Map<String, Object>> countAgentProfit(@RequestParam("agentId") Long agentId) {
                return null;
            }
        };
    }
}